#ifndef LOCK_H
#define LOCK_H
#include <stdint.h>
#include <unistd.h>
#include <string>
#include <map>
#include <mutex>

class LockService{
private:
	std::map<std::string, uint64_t *> locks;
	std::mutex mtx;
public:
	LockService();
	~LockService();
	uint64_t * PathToAddress(std::string &path);
	uint64_t WriteLock(uint64_t *address);
	uint64_t WriteUnlock(uint64_t *address);
	uint64_t ReadLock(uint64_t *address);
	uint64_t ReadUnlock(uint64_t *address);
};
#endif
